package com.pdx.service.impl;

import com.pdx.service.SecurityService;
import com.pdx.utils.DigestsUtil;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
 * @author 派 大 星
 * @function
 * @date 2022/4/6 21:05
 * @website https://blog.csdn.net/Gaowumao
 */
public class SecurityServiceImpl implements SecurityService {


    @Override
    public Map<String,String> findPasswordByLoginName(String loginName) {
        return DigestsUtil.entryptPassword("123");
    }

    @Override
    public List<String> findRoleByLoginName(String loginName) {
        List<String> list = new ArrayList<>();
        list.add("admin");
        list.add("dev");
        return list;
    }

    @Override
    public List<String> findPermissionByLoginName(String loginName) {
        List<String> list = new ArrayList<>();
        list.add("order:add");
        list.add("order:list");
        list.add("order:del");
        return list;
    }
}
